package touchphysics.physics.test;

//import net.phys2d.raw.shapes.Polygon;
import touchphysics.math.Vector2f;
import touchphysics.physics.Body;
import touchphysics.physics.World;
import touchphysics.physics.shape.Box;
import touchphysics.physics.shape.Circle;
import touchphysics.physics.shape.Line;
import touchphysics.physics.shape.Polygon;

public class StartMe extends AbstractDemo{
	public StartMe(){
		super("Test");
	}

	public static void main(String[] args){
		new StartMe().start();
	}
	protected void init(World world1){
//		Body b1 = new Body(new Circle(20), 10);
//		b1.setPosition(10, 0);
		Vector2f[] verts = new Vector2f[]{new Vector2f(10,0),new Vector2f(20,0),new Vector2f(20,30),new Vector2f(0,40)};
		//Vector2f[] verts = new Vector2f[]{new Vector2f(0,0),new Vector2f(0,40),new Vector2f(20,30),new Vector2f(20,0)};
		Body b1 = new Body(new Polygon(verts), 10);
		b1.setPosition(200, 100);
		Body b2 = new Body(new Box(20, 20), 10);
		b2.setPosition(400, 0);
//		StaticBody stc = new StaticBody(new Line(new Vector2f(0,100), new Vector2f(500,500)));
//		StaticBody stc2 = new StaticBody(new Line(new Vector2f(100,400), new Vector2f(500,100)));
		Body stc = new Body(new Box(300, 100));
		stc.setPosition(150, 300);
		//Body stc = new Body(new Line(new Vector2f(0,100), new Vector2f(500,500)));
		Body stc2 = new Body(new Line(new Vector2f(100,400), new Vector2f(500,100)));
		world1.add(b1);
		world1.add(b2);
		world1.add(stc);
		world1.add(stc2);
	}
}
